package net.lcheng.service;

import net.lcheng.commons.utils.PageList;
import net.lcheng.model.PProduct;
import net.lcheng.vo.PProductModel;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Created by zwr on 2016/7/6 0006.
 */
public interface PProductService {
    /***
     * 查找所有的店铺
     * @return
     */
    PageList<PProductModel>getPProductList(Integer pageIndex, Integer pageSize, String productName,String shopName, Date sdate, Date edate);
    /***
     * 推荐到首页
     * @param productId
     * @return
     */
    int getPProductReIsShopRecommend(String productId);
    /**
     * 下架经销商品或者禁销
     * @param id
     * @param status
     * @return
     */
    int getPProductByStatus(String id, Integer status);

    PProduct pProductList();

    /**
     * 获取店铺(获取店铺店主推荐的首页)
     * @param shopId
     * @return
     */
    List<PProduct>getPProductByShopId(Integer shopId);
    /**
     * 获取店铺
     * @return
     */
    List<PProduct>getPProductBySaleCountTotal(Integer saleCountTotal,Integer shopId);

    /**
     * 添加商品
     * @param productId
     * @param pCategoryCategoryId
     * @param wxShopShopId
     * @param wxShopCategoryId
     * @param productCode
     * @param productName
     * @param productMainImage
     * @param salePrice
     * @param inventoryNum
     * @param freight
     * @param productDescription
     * @return
     */
    int addProduct(String productId, String pCategoryCategoryId, Integer wxShopShopId, String wxShopCategoryId, String productCode, String productName, String productMainImage, BigDecimal salePrice, Integer inventoryNum, BigDecimal freight, String productDescription);

    /***
     * 编辑商品
     * @param productId
     * @param pCategoryCategoryId
     * @param productName
     * @param productMainImage
     * @param salePrice
     * @param inventoryNum
     * @param freight
     * @param productDescription
     * @return
     */
    int editProduct(String productId, String pCategoryCategoryId, String productName, String productMainImage, BigDecimal salePrice, Integer inventoryNum, BigDecimal freight, String productDescription);

    /**
     * 搜索分类名称
     * @param shopId
     * @param productName
     * @return
     */
    List<PProduct>getPProductByShopIdAndProductName(Integer shopId,String productName,Integer status);

    /**
     * 根据店铺分类id获取商品列表
     * @param wxShopCategoryId
     * @return
     */
    List<PProduct> pProductByPProductId(Integer shopId,String wxShopCategoryId,Integer status);
}
